<script type="text/javascript">
    $(function() {
        $("a.show-icon-only").button({
            text: false,
            icons: {
                primary: "ui-icon-search"
            }
        });
        $("a.edit-icon-only").button({
            text: false,
            icons: {
                primary: "ui-icon-pencil"
            }
        });
        $("a.candidates-icon-only").button({
            text: false,
            icons: {
                primary: "ui-icon-person"
            }
        });
        $("a.nominees-icon-only").button({
            text: false,
            icons: {
                primary: "ui-icon-flag"
            }
        });
    });
</script>

<?php foreach ($categories as $category): ?>
    <tr>
        <td><a href="<?php echo url_for('category_show', $category) ?>"><?php echo $category->getName() ?></a></td>
        <td><?php echo $category->getDescription() ?></td>
        <td>
            <a class="show-icon-only" title="Detalles" href="<?php echo url_for('category_show', $category) ?>"><?php echo $category->getName() ?></a>
            <a class="edit-icon-only" title="Editar" href="<?php echo url_for('category_edit', $category) ?>"><?php echo $category->getName() ?></a>
            <a class="candidates-icon-only" title="Ver Candidatos" href="<?php echo url_for('category_candidates', $category) ?>">Ver Candidatos</a>
            <a class="nominees-icon-only" title="Ver Nominados" href="<?php echo url_for('category_nominees', $category) ?>">Ver Nominados</a>
        </td>
    </tr>
<?php endforeach; ?>
